package com.chapter11.chap_exercise.test08;

import org.w3c.dom.ls.LSOutput;

import java.sql.SQLOutput;

@SuppressWarnings({"all"})
public enum Color implements IColor {
    RED(255, 0, 0),BLUE(0, 0, 255),
    YELLOW(255, 255, 0),GREEN(0, 255, 0);

    private int redValue;
    private int greenValue;
    private int blueValue;

    Color(int redValue, int greenValue, int blueValue) {
        this.redValue = redValue;
        this.greenValue = greenValue;
        this.blueValue = blueValue;
    }


    @Override
    public void show() {
        System.out.println("属性值为" + redValue + " , " + greenValue + " , " + blueValue);
    }

    @Override
    public String toString() {
        return "Color{" +
                "redValue=" + redValue +
                ", greenValue=" + greenValue +
                ", blueValue=" + blueValue +
                '}';
    }
}

interface IColor {

    public abstract void show();

}


